package sr.myserver.commons;

import sr.myserver.vo.common.Basic;

public class Result {
    public static final String OK = "0000";
    public static final String FAIL = "0001";

    public static Basic.Response ok() {
        return new Basic.Response(OK, "处理成功");
    }

    public static Basic.Response ok(String msg) {
        return new Basic.Response(OK, msg);
    }

    public static Basic.Response fail() {
        return new Basic.Response(FAIL, "处理失败");
    }

    public static Basic.Response fail(String msg) {
        return new Basic.Response(FAIL, msg);
    }

    public static Basic.Response fail(String code, String msg) {
        return new Basic.Response(code, msg);
    }
}
